﻿using System;
using System.Data;
using System.Web.UI;
using MyWeb.Business;

namespace MyWeb.TrangChinh.UC
{
    public partial class ucFooter : UserControl
    {
        private readonly CompanyService _companyService = new CompanyService();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = _companyService.Company_GetByAll();
                if (dt.Rows.Count > 0)
                {
                    lblName.Text = dt.Rows[0]["Name"].ToString();
                    lblAddress.Text = dt.Rows[0]["Address"].ToString();
                    lblTel.Text = dt.Rows[0]["Phone"].ToString();
                    lblEmail.Text = dt.Rows[0]["Email"].ToString();
                }
            }
        }
    }
}